import java.util.Scanner;

public class BinaryNumber {
    public static  int binaryNumber(int num){
        int count=0;
        while(num!=0) {
            if ((num & 1) != 0) {
                count++;
            }
            num=num>>>1;
        }
        return count;
    }
    public static void main(String[] args) {
        //求一个整数的二进制1的个数
        Scanner scan=new Scanner(System.in);
       int num=scan.nextInt();
       int ret= binaryNumber (num);
        System.out.println(ret);
    }
}
